home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / MACADVCT.ISO / mac / Goodies / Fun Stuff / Utilities / UltraFind / AppleScript™ Examples / UTF Find Creator & Type < prev    next >
Text File  |  1996-12-30  |  1KB  |  37 lines

  1. tell application "UltraFind 2.3"
  2.     clear
  3.     set the text of fileName of its searchRoutine to "read"
  4.     set the fileCreator of its searchRoutine to "ttxt"
  5.     set the fileType of its searchRoutine to "TEXT"
  6.     scan
  7. end tell
  8.  
  9. copy the result to numFiles
  10.  
  11. if numFiles is greater than 0 then
  12.     repeat with fileNum from 1 to numFiles
  13.         
  14.         tell application "UltraFind 2.3"
  15.             copy (the fileName of fileRecord fileNum) to fName
  16.             copy (the fileCreator of fileRecord fileNum) to fCreator
  17.             copy (the fileType of fileRecord fileNum) to fType
  18.             copy (the accessPath of fileRecord fileNum) to fPath
  19.             copy (the fileSize of fileRecord fileNum) to fSize
  20.         end tell
  21.         
  22.         -- --------------------------------------------
  23.         -- OUTPUT
  24.         -- In this example a simple dialog is used for output,
  25.         -- you should replace this with the application you want the information output to.
  26.         -- --------------------------------------------
  27.         
  28.         display dialog "Found 'ReadMe' " & (fileNum as text) & " of " & (numFiles as text) & return & return & ┬
  29.             "Filename : " & fName & return & ┬
  30.             "Creator   : '" & fCreator & "'" & return & ┬
  31.             "Type       : '" & fType & "'" & return & ┬
  32.             "Size        : " & (fSize as text) & return & return & ┬
  33.             "Where:" & return & return & fPath ┬
  34.             buttons {"Cancel", "Next"} default button 2
  35.     end repeat
  36. end if
  37.